<template>
  <a-form ref="formRef" :model="form" :rules="rules" layout="vertical">
    <a-row :gutter="20">
      <a-col :span="12">
        <a-form-item name="managerName">
          <template #label>
            <span>
              煤场管理名称（可随意输入，不生效）
              <a-tooltip v-if="false">
                <template #title></template>
                <QuestionCircleOutlined />
              </a-tooltip>
              <span>：</span>
            </span>
          </template>
          <a-input v-model:value="form.managerName" style="width: 100%" placeholder="请输入管理名称" allow-clear autocomplete="off" /> 
        </a-form-item>
      </a-col>
      <a-col :span="12">
        <a-form-item name="managerCode">
          <template #label>
            <span>
              煤场管理编码（可随意输入，不生效）
              <a-tooltip v-if="false">
                <template #title></template>
                <QuestionCircleOutlined />
              </a-tooltip>
              <span>：</span>
            </span>
          </template>
          <a-input v-model:value="form.managerCode" style="width: 100%" placeholder="请输入管理编码" allow-clear autocomplete="off" /> 
        </a-form-item>
      </a-col>

      <a-col :span="12">
        <a-form-item name="managerSiteCode">
          <template #label>
            <span>
              煤场基础场地代码
              <a-tooltip v-if="false">
                <template #title></template>
                <QuestionCircleOutlined />
              </a-tooltip>
              <span>：</span>
            </span>
          </template>
          <a-select
            :disabled="false"
            v-model:value="form.managerSiteCode"
            placeholder="煤场基础场地代码"
            :options="siteCodeList"
            @change="getSiteCodeAttributes"
          />

        </a-form-item>
      </a-col>
      <a-col :span="12">
        <a-form-item name="managerZoneCode">
          <template #label>
            <span>
              煤场基础分区代码
              <a-tooltip v-if="false">
                <template #title></template>
                <QuestionCircleOutlined />
              </a-tooltip>
              <span>：</span>
            </span>
          </template>
          <a-select
            :disabled="false"
            v-model:value="form.managerZoneCode"
            placeholder="煤场基础场地代码"
            :options="zoneCodeList"
            @change="getZoneCodeAttributes"
          />
          <!-- <dict-select v-model:value="form.managerZoneCode" valueType="dictId" dictTypeId="1354040335406587906" placeholder="请选择" />             -->
        </a-form-item>
      </a-col>
      
      <a-col :span="8">
        <a-form-item name="managerZoneIdealCapacity">
          <template #label>
            <span>
              理想容量（t）
              <a-tooltip v-if="false">
                <template #title></template>
                <QuestionCircleOutlined />
              </a-tooltip>
              <span>：</span>
            </span>
          </template>
          <a-input-number v-model:value="form.managerZoneIdealCapacity" style="width: 100%" placeholder="请输入理想容量（t）" allow-clear autocomplete="off" /> 
        </a-form-item>
      </a-col>
      <a-col :span="8">
        <a-form-item name="managerZoneLowStock">
          <template #label>
            <span>
              低库存警戒值（t）
              <a-tooltip v-if="false">
                <template #title></template>
                <QuestionCircleOutlined />
              </a-tooltip>
              <span>：</span>
            </span>
          </template>
          <a-input-number v-model:value="form.managerZoneLowStock" style="width: 100%" placeholder="请输入低库存警戒值（t）" allow-clear autocomplete="off" /> 
        </a-form-item>
      </a-col>

      <a-col :span="8">
        <a-form-item name="remark">
          <template #label>
            <span>
              备注
              <a-tooltip v-if="false">
                <template #title></template>
                <QuestionCircleOutlined />
              </a-tooltip>
              <span>：</span>
            </span>
          </template>
          <a-input v-model:value="form.remark" style="width: 100%" placeholder="请输入备注" allow-clear autocomplete="off" /> 
        </a-form-item>
      </a-col>
    </a-row>


  </a-form>
</template>

<script setup name="WmMdWarehouseManageForm">
import { reactive, ref } from 'vue';
// import DictSelect from '@/components/DictSelect/DictSelect.vue';
// import { WmMdWarehouseApi } from '../../wm-md-warehouse/api/WmMdWarehouseApi';



const props = defineProps({
  // 表单数据
  form: Object,
  siteCodeList:{
    default:()=>[]
  },
  zoneCodeList:{
    default:()=>[]
  }
  
});


  
// 模板列表
// const emits = defineEmits(['getSiteCodeAttributes']);

// 验证规则
const rules = reactive({
  managerName: [{ required: true,  message: '请输入煤场管理名称', type: 'string', trigger: 'blur' }],
  managerCode: [{ required: true,  message: '请输入煤场管理编码', type: 'string', trigger: 'blur' }],
  managerSiteCode: [{ required: true,  message: '请输入煤场基础场地代码', type: 'string', trigger: 'blur' }],
  managerZoneCode: [{ required: true,  message: '请输入煤场基础分区代码', type: 'string', trigger: 'blur' }],
  managerZoneIdealCapacity: [{ required: true,  message: '请输入理想容量（t）', type: 'number', trigger: 'blur' }],
  managerZoneLowStock: [{ required: true,  message: '请输入低库存警戒值（t）', type: 'number', trigger: 'blur' }],
});



defineExpose({
 
})

</script>

<style></style>
